package mirrormonkey.rpc.tools.multispec.entities;

import mirrormonkey.core.annotations.ClientSideConstructor;
import mirrormonkey.core.annotations.EntityHierarchy;
import mirrormonkey.framework.entity.EntityData;
import mirrormonkey.framework.entity.SyncEntity;
import mirrormonkey.rpc.tools.multispec.specs.FirstSpec;
import mirrormonkey.rpc.tools.multispec.specs.SecondSpec;

@EntityHierarchy
public class ImplementingSpecs implements FirstSpec, SecondSpec, SyncEntity {

	public EntityData data;

	public boolean firstFlag;

	public boolean secondFlag;

	public boolean sharedFlag;

	@ClientSideConstructor
	public ImplementingSpecs() {
		clear();
	}

	public void clear() {
		firstFlag = false;
		secondFlag = false;
		sharedFlag = false;
	}

	@Override
	public void setData(EntityData data) {
		this.data = data;
	}

	@Override
	public EntityData getData() {
		return data;
	}

	@Override
	public void secondMethod() {
		secondFlag = true;
	}

	@Override
	public void firstMethod() {
		firstFlag = true;
	}

	@Override
	public void sharedMethod() {
		sharedFlag = true;
	}

}
